<html lang="en" xml:lang="en"><head>
<META http-equiv="Content-Type" content="text/html">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><META name="description" content="Communication to app container"><meta name="content-language" content="en"><link href="rsrc/htmlhelp.css" rel="stylesheet" type="text/css"><title>Web AppBuilder for ArcGIS | Help - 
Communication to app container</title>
                <script type="text/javascript" language="JavaScript">
                    var pathL  = self.location.pathname.split ("/");
                    var fname = pathL[pathL.length-1];
                    var i = fname.lastIndexOf (".htm");
                    if (i>=0) {
                    fname = fname.substring (0, i)
                    } else {
                    //??
                    }
                    if (self.location.hash) {
				    		      fname = fname + self.location.hash;
						        }
                    self.location.replace ("../index.html#//" + fname);
                </script>
                </head><!--Publication GUID: [GUID-E7D1C130-8F87-4109-8D61-E73A46083F52]--><!--Topic GUID: [GUID-BED83597-4007-4277-B6AE-B9F554404864]--><body><div id="content"><div class="header"><h1>
Communication to app container</h1><div id="breadcrumb"></div></div>

<p id="GUID-A1CD4BB3-4E6F-4627-933B-5F25C4FF041E">The widget is a Dojo Dijit widget; therefore, when a widget instantiates, it goes through the full life cycle of a Dijit widget, such as constructor, postCreate, and startup. For more information, see <a target="_blank" class="xref" href="http://dojotoolkit.org/documentation/tutorials/1.9/understanding_widgetbase/" rel="http://dojotoolkit.org/documentation/tutorials/1.9/understanding_widgetbase/">http://dojotoolkit.org/documentation/tutorials/1.9/understanding_widgetbase/</a>.</p><p id="GUID-58C6E042-97A4-4A1D-A68D-7803F3D83AFE">In addition to the Dojo Dijit life cycle functions, the widget has other callback functions that you can use:</p>
<p id="GUID-7E821B8A-7841-4B05-A2A8-4EA58EB0B58C"><div class="block_table" id="TABLE_7C99205C02754BE1B30CF84A68A9C6BE" purpose="block_table"><span class="table_title"></span><table class="table"><colgroup width="*"></colgroup><colgroup width="*"></colgroup><tr purpose="thead"><th class="th" purpose="th" rowspan="1" colspan="1"><p id="GUID-77365E26-2B06-4A39-A2A8-DF6EFA3F9203">Attribute</p></th><th class="th" purpose="th" rowspan="1" colspan="1"><p id="GUID-10BDFB6F-0E1E-45B2-A442-DFF2DB29B6CD">Description</p></th></tr><tbody><tr><td purpose="entry" rowspan="1" colspan="1"><p id="GUID-AB2C6D42-38E0-4F42-A4C6-0C77154ADA64"><span class="usertext">onOpen</span></p></td><td purpose="entry" rowspan="1" colspan="1"><p id="GUID-E3CA0788-BBAB-4489-9129-E693DF64FB4F">Called each time the widget opens. When a widget instantiates, this method is called after startup.</p></td></tr><tr><td purpose="entry" rowspan="1" colspan="1"><p id="GUID-CEF4DBEB-950F-4F43-A83B-619C0A09FFB5"><span class="usertext">onMaximize</span></p></td><td purpose="entry" rowspan="1" colspan="1"><p id="GUID-3F3B4E8D-708A-45BC-AB4C-6E9C3F18C64F">Called when the widget is maximized. This method may never be called in some panels that do not have a maximize/minimize state.</p></td></tr><tr><td purpose="entry" rowspan="1" colspan="1"><p id="GUID-8D5DF9B0-3B93-420C-9A34-2FB223606FDE"><span class="usertext">onMinimize</span></p></td><td purpose="entry" rowspan="1" colspan="1"><p id="GUID-E85A50FD-59DA-4888-BBDB-14708D5AF9D1">Called when the widget is minimized. This method may never be called in some panels that do not have a maximize/minimize state.</p></td></tr><tr><td purpose="entry" rowspan="1" colspan="1"><p id="GUID-B1ED1485-2B9F-4135-BE15-DDCAF665D7FC"><span class="usertext">onClose</span></p></td><td purpose="entry" rowspan="1" colspan="1"><p id="GUID-E8B2E132-67C0-4548-AE9E-9A65DC6902C4">Called when the widget closes.</p></td></tr><tr><td purpose="entry" rowspan="1" colspan="1"><p id="GUID-FACA177A-0E69-40CF-9AEE-873E155768B1"><span class="usertext">onSignIn</span></p></td><td purpose="entry" rowspan="1" colspan="1"><p id="GUID-C47BF45E-6CEE-48C4-9D35-46280963533E">Called when a user signs in to the portal or ArcGIS Online.</p></td></tr><tr><td purpose="entry" rowspan="1" colspan="1"><p id="GUID-39F659F3-3674-4B6C-B118-FAC6FB46308A"><span class="usertext">onSignOut</span></p></td><td purpose="entry" rowspan="1" colspan="1"><p id="GUID-F37F6D86-8B7E-478F-BDC3-9B0FB4778D86">Called when a user signs out from the portal or ArcGIS Online.</p></td></tr><tr><td purpose="entry" rowspan="1" colspan="1"><p id="GUID-5DEE9912-1009-4A47-B184-8484FBD299AE"><span class="usertext">onPositionChange</span></p></td><td purpose="entry" rowspan="1" colspan="1"><p id="GUID-437C8BB8-B6AC-40D9-BE89-225ED53369C0">Called when the widget's position (left, right, top, bottom, width, height) changes. The widget's position may be changed when the user changes the layout in the builder.</p></td></tr><tr><td purpose="entry" rowspan="1" colspan="1"><p id="GUID-CA5A6066-9373-4BE2-A4F7-CDF9BD5E5BA6"><span class="usertext">resize</span></p></td><td purpose="entry" rowspan="1" colspan="1"><p id="GUID-C05D17DE-1A5F-455B-A3E2-36DDF388882E">Called when the window resizes.</p></td></tr><tr><td purpose="entry" rowspan="1" colspan="1"><p id="GUID-10B028E0-418A-420A-8EF7-78683B5DA089"><span class="usertext"> onNormalize</span></p></td><td purpose="entry" rowspan="1" colspan="1"><p id="GUID-28F48097-B837-4364-AA5C-D079E8DE491A"> Called when the widget is normalized.</p></td></tr><tr><td purpose="entry" rowspan="1" colspan="1"><p id="GUID-29779D0B-3173-4319-A5D2-5A1A65818BF9"><span class="usertext"> onActive</span></p></td><td purpose="entry" rowspan="1" colspan="1"><p id="GUID-32CAE5B6-2FA7-4670-A41E-A76F99F589D6"> Called when the widget is active. A widget is active when users click it.</p></td></tr><tr><td purpose="entry" rowspan="1" colspan="1"><p id="GUID-CD576EA1-AB2B-4215-B3EA-0EBFB9671D4D"><span class="usertext"> onDeActive</span></p></td><td purpose="entry" rowspan="1" colspan="1"><p id="GUID-0AE13566-681B-4D61-9091-EA878C859489"> Called when the widget is  not active. Other widgets are not active when users click a widget. </p></td></tr><tr><td purpose="entry" rowspan="1" colspan="1"><p id="GUID-B312B6EC-6BC4-409B-AB33-701E2449E64E"><span class="usertext"> setPosition</span></p></td><td purpose="entry" rowspan="1" colspan="1"><p id="GUID-DCC5B018-5F02-4BC8-8B6D-EE88D5D7596D"> Called before the on-screen widget opens. By default, the widget is placed at the configured position, which can be overridden.</p></td></tr><tr><td purpose="entry" rowspan="1" colspan="1"><p id="GUID-4CB5EB3D-B9FF-4F79-BC35-9E6F271FEE6C"><span class="usertext"> getPanel</span></p></td><td purpose="entry" rowspan="1" colspan="1"><p id="GUID-AC064D91-5F25-4663-AE13-513BF4042CD5"> Returns the widgets' panel.  For an off-panel widget, it is null.</p></td></tr></tbody></table><span class="table_desc"></span></div></p>
<div class="footer"> Copyright © 1995-2016 Esri. All rights reserved. </div></div></body></html>